/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.meanzoft.m3d.scene.camera;

import org.meanzoft.m3d.scene.*;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.glu.GLU;
import org.lwjgl.util.vector.Vector3f;

/**
 *
 * @author Laptop
 */
public class FreeCamera extends Camera {

    public FreeCamera() {
        super();
    }

    public void lookAt(Vector3f target) {
        GLU.gluLookAt(position.x, position.y, position.z, target.x, target.y, target.z, 0.0f, 1.0f, 0.0f);
    }

    public void updateRender() {
        GL11.glRotatef(-getPitch(), 1.0f, 0.0f, 0.0f);
        GL11.glRotatef(getYaw(), 0.0f, 1.0f, 0.0f);
        GL11.glTranslatef(position.x, position.y, position.z);
    }
    
    public void updateSkyBoxRender() {
        GL11.glRotatef(-getPitch(), 1.0f, 0.0f, 0.0f);
        GL11.glRotatef(getYaw(), 0.0f, 1.0f, 0.0f);
    }    
}
